
var mySwiper = new Swiper ('.swiper-container', {
    loop: true, // 循环模式选项
    autoplay:true,
    // 如果需要分页器
    pagination: {
        el: '.swiper-pagination'
    },

    // 如果需要前进后退按钮
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev'
    }

}) ;


var nav_right = document.querySelectorAll(".nav-right li");
var yu = document.querySelector("#yu");

window.onscroll= function(){
    var t= document.documentElement.scrollTop||document.body.scrollTop;
    console.log(t);
    for(var i = 0;i<nav_right.length;i++){
        nav_right[i].classList.remove('active');
    }
    if(t<500){
        nav_right[0].classList.add('active');
    }else if(t<1100){
        nav_right[1].classList.add('active');
    }else if(t<1800){
        nav_right[2].classList.add('active');
    }else if(t<2700){
        nav_right[3].classList.add('active');
    }else if(t<3000){
        nav_right[4].classList.add('active');
    }else if(t<3600){
        nav_right[5].classList.add('active');
    }else if (t > 3800){
        yu.style.display = "none";
    }else {
        yu.style.display = "block";
    }
};




